package com.zwj.design.test.behavior.strategy.observer;

/**
 * @author 张文接
 * @version 1.0
 * @createTime 2024/3/18 23:50
 */
public class Demo {
    public static void main(String[] args) {
        //被观察者
        Product product = new Product(1L,99L);
        User user = new User(product);
        //价格发生了改变,涨价了100元，开始通知
        product.change(1L,100L);
        product.change(1L,200L);
    };
}
